]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
MessageTray: disconnect signal to notification early
authorGiovanni Campagna <gcampagna@src.gnome.org>
Mon, 28 Jan 2013 11:09:17 +0000 (12:09 +0100)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Mon, 28 Jan 2013 20:02:46 +0000 (21:02 +0100)
Similar to the previous patch, this adds robustness and prevents more
stacktraces and confusion in the state machine.

https://bugzilla.gnome.org/show_bug.cgi?id=692693

js/ui/messageTray.js

index 277b7e30bf2ce32f361595e7602f01b693c915a3..79a91df3c415c89efdfa0751e8396bcf9a200d98 100644 (file)
@@ -2384,11 +2384,18 @@ const MessageTray = new Lang.Class({
             this.idleMonitor.disconnect(this._idleMonitorBecameActiveId);
             this._idleMonitorBecameActiveId = 0;
         }
-
         if (this._notificationExpandedId) {
             this._notification.disconnect(this._notificationExpandedId);
             this._notificationExpandedId = 0;
         }
+        if (this._notificationClickedId) {
+            this._notification.disconnect(this._notificationClickedId);
+            this._notificationClickedId = 0;
+        }
+        if (this._notificationUnfocusedId) {
+            this._notification.disconnect(this._notificationUnfocusedId);
+            this._notificationUnfocusedId = 0;
+        }
 
         if (this._notificationRemoved) {
             Tweener.removeTweens(this._notificationWidget);
@@ -2411,10 +2418,7 @@ const MessageTray = new Lang.Class({
 
     _hideNotificationCompleted: function() {
         this._notification.collapseCompleted();
-        this._notification.disconnect(this._notificationClickedId);
-        this._notificationClickedId = 0;
-        this._notification.disconnect(this._notificationUnfocusedId);
-        this._notificationUnfocusedId = 0;
+
         let notification = this._notification;
         this._notification = null;
         if (notification.isTransient)